import java.util.Scanner;
class Student{
    private String name;
    private int age;

    public Student(){
        age = 7;
        name = "无名";
        System.out.println("无参构造方法");
    }

    public void display(){
        System.out.println("name:" + name + ",age:" + age);
    }

    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name = name;
    }
    public int getAge(){
        return age;
    }
    public void setAge(int age){
        if(age <= 6){
            this.age = 7;
        }else{
            this.age = age;
        }
    }
}

public class Main{
    public static void main(String[] args){
        Student student = new Student();
        Scanner sc = new Scanner(System.in);
        student.display();
        String name = sc.next();
        int age = sc.nextInt();
        student.setName(name);
        student.setAge(age);
        student.display();
    }
}
// import java.util.Scanner;

// class Student{
// 	private String name;
// 	private int age;
// 	public void setname(String s){
// 		name = s;
// 	}
// 	public void setage(int i){
// 		if(i <= 6)
// 			age = 7;
// 		else
// 			age = i;
// 	}
// 	public Student(){
// 		name = "无名";
// 		age  = 7;
// 		System.out.println("无参构造方法");
// 	}
// 	public void display(){
// 		System.out.println("name:"+name+",age:"+age);
// 	}
// }

// public class Main{
// 	public static void main(String[] args){
// 		Scanner in = new Scanner(System.in);
// 		Student s = new Student();
// 		s.display();
// 		s.setname(in.next());
// 		s.setage(in.nextInt());
// 		s.display();
// 	}
// }


